<template>
  <div class="list-search">
    <div class="search">
      <el-form
        ref="form"
        :model="searchForm"
        label-width="72px"
        label-suffix=":"
      >
        <el-row>
          <el-col :span="5">
            <el-form-item label="型号" prop="Model" size="small">
              <el-input v-model="searchForm.Model" placeholder="请输入型号"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="订单号" prop="OrderNum" size="small">
              <el-input v-model="searchForm.OrderNum" placeholder="请输入订单号"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="状态" prop="Status" size="small">
              <el-select v-model="searchForm.Status">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="下单日期" prop="Date" size="small">
              <myDate @getSelectData="getCreateDate" :createDate="searchForm.Date"/>
            </el-form-item>
          </el-col>
          <el-col :span="4" style="text-align:center">
            <el-button style="background:#004FEE;color:#fff;" size="small">搜索</el-button>
            <el-button size="small">重置</el-button>
          </el-col>
        </el-row>
      </el-form>
    </div>
  </div>
</template>

<script>
import myDate from "@/components/Date/index";
export default {
  name: "listSearch",
  props:{name:String},
  data() {
    return {
      searchForm: {
        Status:1,
        OrderNum:'',
        OrderId:'',
        Model:'',
        Date:[]
      },
      options:[
        {
          value:1,
          label:'全部'
        },
        {
          value:2,
          label:'待发货'
        },
         {
          value:3,
          label:'待审批'
        },
         {
          value:4,
          label:'部分发货'
        },
         {
          value:5,
          label:'全部发货'
        },
      ]
    };
  },
  components:{
    myDate
  },
  methods:{
    getCreateDate(date) {
      this.searchForm.createDate  = date
    }
  },
};
</script>

<style scoped lang="scss">
.list-search {
  .search {
    margin-top: 10px;
  }
}
</style>